using YatFram.UnitTesting;

namespace Examples.UnitTestATM
{
    public class CannedAccountRepository : IAccountRepository, IFake<IAccountRepository>
    {
        private readonly Account _account;

        public CannedAccountRepository() : this(new Account("123",0))
        {
        }

        public CannedAccountRepository(Account account)
        {
            _account = account;
        }

        public Account Find(string accountNumber)
        {
            return _account;
        }

    }
    public static class TestAccount
    {
        public static Account InCredit = new Account("123", 10000);
        public static Account InDebit = new Account("123", 0);

        public static Account With(Money amount)
        {
            return new Account("123", amount);
        }
    }
}